home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
MATHS
/
ARCAUT
/
Automatons
/
HPP-Gas
< prev
next >
Wrap
Text File
|
1991-07-27
|
892b
|
33 lines
AUTOMATON*
HPP-Gas
This Margolus neighbourhood automaton simulates a gas cloud. The particles
travel along diagonals; number & momentum are preserved in collisions. A
simple alteration allows the introduction of walls & many coloured gasses.
Experiments can then be performed demonstrating the self diffusion which
takes place in a gas, constantly mixing it, & diffusion, whereby a gas will
fill the container in which it is placed; because this is a very simple
model, diffusion of the gas into a vacuum works best when the container is
of an irregular shape. Compare with 'TM-Gas'.
INITIALISATION*
10DEF PROCdo
20*SetEval wrap on
30*SetEval neig margolus
40ENDPROC
SCREEN*
10DEF PROCdo
20PROCsoup(255,1,.1)
30ENDPROC
CODE*
( READ_NEIG
CELL OPP = IF (CW CCW = IF (CELL CW <> IF (CW ==)))
OPP == )
END*